<!--sidebar start-->
<aside>
    <div id="sidebar" class="nav-collapse">
        <!-- sidebar menu start-->
        <div class="leftside-navigation">

            <ul class="sidebar-menu" id="nav-accordion">

            {% for title, courses_with_same_title in view.sidebar_dic.items %}


                {% if title == view.course_slug %}

                    {% with temp_course=courses_with_same_title|first %}
                    <li class='course_node {{ temp_course.slug }}'>
                        <a href="{% url "course:united_students" temp_course.slug %}">
                            <i class="fa fa-user"></i>
                            <span>All Students</span>
                        </a>
                    </li>
                    {% endwith %}


                    {% for course_obj in courses_with_same_title %}
                    <li class="sub-menu course_node {{ course_obj.slug }}">

                        <a href="javascript:;">
                            <i class="fa fa-book"></i>
                            <span>{{ course_obj.semester|add:course_obj.classroom }}</span>
                        </a>
                        <ul class="sub">
                            <li><a href="{% url "course:students" course_obj.id %}">Manage Students</a></li>
                            <li><a href="{% url "course:calendar" course_obj.id %}">Course Calendar</a></li>
                        </ul>
                    </li>
                    {% endfor %} <!-- courses of a course_slug -->

                {% endif %}


            {% endfor %}

            </ul>
        </div>
        <!-- sidebar menu end-->
    </div>
</aside>
<!--sidebar end-->